﻿using Apps.Models.HuaChan;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Apps.IBLL.HuaChan
{
    public partial interface IHUACHAN_BLL
    {

        /// <summary>
        /// 获取化产项目详情
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        HUACHAN_PROJECT ProjectInfo(string id);

        /// <summary>
        /// 查询标题是否存在
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        bool ProjectAny(string name, string id = "");

        /// <summary>
        /// 获取化产项目列表
        /// </summary>
        /// <returns></returns>
        List<HUACHAN_PROJECT> ProjectList(int pageIndex, int pageSize, string sort, string order, ref int totalCount, string keyWord);

        List<HUACHAN_PROJECT> GetNopageList(string keyWord);

        /// <summary>
        /// 添加化产项目
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        bool ProjecAdd(HUACHAN_PROJECT model);

        /// <summary>
        /// 修改化产项目
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        bool ProjectEdit(HUACHAN_PROJECT model);

        /// <summary>
        /// 删除化产项目
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        bool ProjectDelete(string id);

        /// <summary>
        /// 获取此化产项目包含的字段
        /// </summary>
        /// <param name="projectId"></param>
        /// <returns></returns>
        List<HUACHAN_PROJECT_FIELDS> GetListDetail(string projectId);

        /// <summary>
        /// 根据化产表单获取化产数据
        /// </summary>
        /// <param name="projectId"></param>
        /// <returns></returns>
        List<HUACHAN_PROJECT_DATA> GetProjectData(int pageIndex, int pageSize, ref int totalCount, string sortFiled, string orderBy, string examine, string projectId, string startTime, string endTime);

        /// <summary>
        /// 根据化产表单获取化产数据 不分页
        /// </summary>
        /// <param name="sortFiled"></param>
        /// <param name="orderBy"></param>
        /// <param name="examine"></param>
        /// <param name="projectId"></param>
        /// <param name="startTime"></param>
        /// <param name="endTime"></param>
        /// <returns></returns>
        List<HUACHAN_PROJECT_DATA> GetProjectData(string sortFiled, string orderBy, string examine, string projectId, string startTime, string endTime);

        /// <summary>
        /// 添加化产表单数据
        /// </summary>
        /// <param name="projectId"></param>
        /// <returns></returns>
        bool AddProjectData(HUACHAN_PROJECT_DATA model);

        /// <summary>
        /// 编辑化产表单数据
        /// </summary>
        /// <param name="projectId"></param>
        /// <returns></returns>
        bool UpdateProjectData(HUACHAN_PROJECT_DATA model);

        /// <summary>
        /// 删除化产表单数据
        /// </summary>
        /// <param name="projectId"></param>
        /// <returns></returns>
        bool DelProjectData(string dataId);

        /// <summary>
        /// 根据编号获取 数据
        /// </summary>
        /// <param name="dataId"></param>
        /// <returns></returns>
        HUACHAN_PROJECT_DATA GetProjectData(string dataId);

        /// <summary>
        /// 判断此项目是否存在记录
        /// </summary>
        /// <param name="dataId"></param>
        /// <returns></returns>
        bool ThisProjectIsAnyData(string projetId);

        /// <summary>
        /// 根据编号获取 数据
        /// </summary>
        /// <param name="dataId"></param>
        /// <returns></returns>
        DataTable GetProjectDataTable(string dataId);

        /// <summary>
        /// 批量审核
        /// </summary>
        /// <param name="ids"></param>
        /// <param name="examine"></param>
        /// <returns></returns>
        bool ExamineProjectData(List<string> ids, string examine);

        /// <summary>
        /// 根据条件查询所有数据
        /// </summary>
        /// <param name="startDate"></param>
        /// <param name="endDate"></param>
        /// <param name="isExamine"></param>
        /// <returns></returns>
        List<HUACHAN_PROJECT_DATA> GetAllData(string startDate, string endDate, string isExamine);

        /// <summary>
        /// 根据条件查询所有项目
        /// </summary>
        /// <param name="startDate"></param>
        /// <param name="endDate"></param>
        /// <param name="isExamine"></param>
        /// <returns></returns>
        List<HUACHAN_PROJECT> GetAllProject();

        /// <summary>
        /// 根据条件查询所有配置项
        /// </summary>
        /// <param name="startDate"></param>
        /// <param name="endDate"></param>
        /// <param name="isExamine"></param>
        /// <returns></returns>
        List<HUACHAN_PROJECT_FIELDS> GetAllFields();
    }
}
